package com.jingbian.cppccbackend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 管理员信息表
 * </p>
 *
 * @author yezi
 * @since 2025-02-09
 */
@Getter
@Setter
@ToString
@EqualsAndHashCode
public class Admins implements Serializable {

    private static final long serialVersionUID = 1L;
    @NotNull
    @TableId(value = "aid", type = IdType.AUTO)
    private Integer aid;
    @NotEmpty
    private String account;
    @NotEmpty
    private String controller;
    @NotEmpty
//    @JsonIgnore
    private String password;

    private Boolean manageUsers;

    private Boolean manageMeetings;

    private Boolean manageEvents;

    private Boolean manageCheckIns;

    private Boolean publishNews;

    private Boolean editHomePage;

    private Boolean managePropositions;

    private Boolean managePublic;


    private Integer propositionsDepId;

    private  Integer publicDepId;

    private String status;

    private Boolean isSuperAdmin;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime registrationTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime updateTime;

    private Integer permissionCount;

    private String propositionsDepName;
    private String publicDepName;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime logoutTime;
}